/**
 * 
 */
package com.qolome.order.message;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * @Description: 流消费者
 * @author 姜锋
 * @date 2020年1月21日 下午6:53:33 
 * @version V1.0   
 *
 */
@EnableBinding(StreamClient.class)
@Component
@Slf4j
public class StreamConsumer {
	
	
	@StreamListener(value = StreamClient.INPUT)
	@SendTo(StreamClient.OUTPUT)
	public String process(Object message) {
		log.info("myMessage:{}",message);
		return String.valueOf(message);
	}
	
	 @StreamListener(value = StreamClient.OUTPUT)
	    public void process2(String message) {
	        log.info("StreamReceiver2: {}", message);
	    }
}
